While you are working at your computer at NCEAS, you receive a frantic call from someone working on an OHI project:
THEY NEED HELP!
“No problem” you say, “I’ll get Julie or Melanie”…but they are no where to be found!
“Hold on, I’ll get Jamie or Casey or Courtney”…but they are also gone.
It is clearly going to be up to you to save the day!!
Please help them answer the following questions. You will work from this document, using the code chunks as a work space to work explore the data. Do NOT bother keeping the code chunks neat and organized, we want to see your work process in all its messy glory. However, I DO recommend including plenty of comments, mostly because I have found this helps me organize my thoughts.
You will work together to check answers, discuss code, troubleshoot. But write your own code.
You can also ask us any questions along the way (slack or issues)!
Good luck!
Goal Read the latest OHI global data into the R working space (call the data object “scores”).
Hint Here is a link to the data: https://raw.githubusercontent.com/OHI-Science/ohi-global/draft/eez/scores.csv
Question Why are there N=222 regions (see code below)…aren’t there supposed to be 220?
Hint 1 Here is a link to the official region list: https://raw.githubusercontent.com/OHI-Science/ohi-global/draft/eez/spatial/regions_list.csv
Hint 2 Which region has all NA values for scores?
Answer region_id 213 has all NA values for its score. This is because region_id 213 is Antarctica which is not included in the global assessment. region_id 0 is not in the official region list. It has scores for every observation. Is this the global averages?
Question Which region id corresponds to the United States?
Question When I look at the number of goals, N=19 show up….I thought there were supposed to be 10 goals!!! Can you explain what all these are? Also, why do some of the goal abbreviations have 2 letters and others 3 letters?
Hint 1 Review the methods doc here: https://raw.githack.com/OHI-Science/ohi-global/published/global2018/Results/Supplement_Results.html
Answer The United States region_id is 163. It includes sub goals. 2 Letters are full goals, while 3 letters are sub goals. Not sure what goal == “Index” is.
Question There are 6 dimensions reported in this dataset (future, pressures, resilience, score, status, and trend). When I look at the number of records in each of these categories, I notice that there are more “score” values reported than “status” values (see working space below). Given that scores are calculated using status, it seems like these should have the same number of records. Can you figure out what is going on here. Is something going wrong?
Answer It looks like the “Index” goal is influencing the number of “score” values. There are values in any of the other dimensions for goal “Index”.
Question Figure out which goals/subgoals have the most NA values for scores in 2018. Which ones have the least? Can you discern any reason why some goals have lots of missing values and others do not?
Hint Include only dimension = score, and year = 2018, and cut region_id = 0.
Answer Natural Products (NP) has the most NA values for 2018 with 83. Carbon Storage (CS) has the second most NA values, with 73. AO, BD, CW, FIS, ICO, Index, LSP, SP, and SPP all have 1 NA values for 2018. The reason for NP having so many NA values could be tha t some regions do not harvest any of the 6 natural product categories included in the score calculation. The goals with the most NA values could be harder to measure than the goals with the least NA values.
Question Artisanal opportunities has no missing data (except for region 213, which is Antarctica). Look over the description of the artisanal opportunities goal (http://ohi-science.org/ohi-global/goals#artisanal_fishing_opportunity). Based on this description, in your opinion, should uninhabited islands be given an NA value?
Answer Yes, uninhabited islands should be given an NA value. This goal is calculated using variables like per capita gross domestic product and average annual income. Since these islands are uninhabited, there can be no data to input for them for Artisanal Opportunities.
Question If we have a goal with a future status of 80 and status of 90…what is the score?
Hint Isolate the future, status, and score values for one region and one goal and see if you can identify a pattern.
Answer Future and status are averaged to get a score, so the score would be 85.
Project Based on your data exploration and other resources, provide some metadata that describes each variable. Write it so it would be useful to you in the future as you are looking through these data.
Write it in the following table. NOTE: Knit the document to see if the table is formatting correctly (but don’t bother if you do not know how to knit a document or if you are running into errors!).
| Variable | Description | Values |
|---|---|---|
| goal | The category of ocean-derived benefit. Abbreviations with 2 letters are goals, while abbreviations with 3 letters are subgoals, which are used to calculate the goals. | AO, BD, CP, CS, CW, ECO, FIS, FP, HAB, ICO, Index, LE, LIV, LSP, MAR, NP, SP, SPP, TR |
| dimension | Variables influencing goal calculation. | future, pressures, resilience, score, status, trend |
| region_id | Numerical value which identifies the region or country in the assessment. | 0 to 250 |
| score | The OHI score associated with an observation. | 0 to 100 |
| year | Scenario year | 2012 to 2019 |
| Abbreviation | Name | Type |
|---|---|---|
| AO | Artisanal Fishing Opportunity | Goal |
| BD | Biodiversity | Goal |
| CP | Coastal Protection | Goal |
| CS | Carbon Storage | Goal |
| CW | Clean Waters | Goal |
| ECO | Economies | Subgoal |
| FIS | Fisheries | Subgoal |
| FP | Food Provision | Goal |
| HAB | Habitat | Subgoal |
| ICO | Iconic Species | Goal |
| Index | Index | Global Average |
| LE | Coastal Livelihoods and Economies | Goal |
| LIV | Livelihoods | Subgoal |
| LSP | Lasting Special Places | Subgoal |
| MAR | Mariculture | Subgoal |
| NP | Natural Products | Goal |
| SP | Sense of Place | Goal |
| SPP | Species Condition | Subgoal |
| TR | Tourism and Recreation | Goal |
Project Create a scatterplot that compares 2012 and 2018 scores for each region for the artisanal opportunities goal. Based on this, do scores for the artisanal opportunities goal appear to have increased or decreased over time?
Answer
##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
Figure 1. The majority of the scores in 2018 are greater than the scores in 2012 for each region. This is seen in the plot, which shows the difference between the scores for each score. The two charts above display the same information.